package com.hoshiicloud.suppplier.feign;


import com.hoshiicloud.suppplier.feign.hystrix.HystrixIdGeneratorFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.LinkedList;

/**
 * @title: IdGeneratorService
 * @author campchen
 * @projectName hoshiibuy
 * @description: 主键服务
 * @since 2019-05-15
 */
@FeignClient(name = "hoshiicloud-id-generator", fallback = HystrixIdGeneratorFeignFallback.class)
@Repository
public interface IdGeneratorService {
    /**
     * 获取主键
     *
     *
     * @return String
     */
    @GetMapping("/getuuId")
    String queryGeneratorId();

    @GetMapping(value = "/getComUserCode")
    String getComUserCode();

    @GetMapping(value = "/getPlatCousomerCode")
    String getPlatCousomerCode();


    /**
     * @param count
     * @return
     * @Description: 获取n个全局唯一的19位数字ID
     * @author Mr.wu
     * @date: 2019年4月23日 下午4:16:56
     */
    @RequestMapping(value = "/getuuIdSet", method = RequestMethod.POST)
    LinkedList<String> getIdList(int count);
}
